{extend name="layout"/}

{block name="breadcrumb"}
<h2>系统消息列表</h2>
<ol class="breadcrumb">
    <li><a href="{:url('index/index')}">首页</a></li>
    <li><strong>系统消息列表</strong></li>
</ol>
{/block}

{block name="search"}
{include file='message/search'/}
{/block}

{block name="main"}
<div class="ibox float-e-margins">
    <div class="ibox-title">
        <h5>系统消息列表</h5>
    </div>
    <div class="ibox-content">
        <p>
            <a href="{:url('form')}" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i> 添加系统消息</a>
        </p>
        <div class="table-responsive">
            <p>共 {$count} 条数据</p>
            <table class="table table-striped">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>问题</th>
                    <th>权重</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {foreach $model as $key=>$vo }
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.title}</td>
                    <td>{$vo.sort_num}</td>
                    <td>
                        <span class="label {$vo.status == 1 ? 'label-info' : 'label-danger'}">{$vo.statusText}</span>
                    </td>
                    <td>{$vo.create_time}</td>
                    <td>
                        <a href="{:url('form', ['id' => $vo.id])}" class="btn btn-success btn-xs">编辑</a>
                        <a href="javascript:void(0);" data-id="{$vo.id}" class="disabled-one btn btn-warning btn-xs">{$vo.status == 1 ? '禁用' : '启用'}</a>
                        <a href="javascript:void(0);" data-id="{$vo.id}" class="delete-one btn btn-danger btn-xs">删除</a>
                    </td>
                </tr>
                {/foreach}
                </tbody>
            </table>
            {$model|raw}
        </div>

    </div>
</div>
{/block}